var express = require('express');
var article = require('../models/article');
var router = express.Router();

router.get('/:id',function(req,res,next){
    var id=req.params["id"];

    article.get(id,function(err,data){
        if(err){
            throw new Error(error);
        }else{
            res.render('modify',{
                article:data
            });
        }
    });
});

module.exports=router;